<html>
<head>
      <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
      <title>微信用户信息管理</title>
      <style type="text/css">
      div{text-align:center;}
      </style>
</head>
<body>
<center>
      <?php include 'menu.php';//导入导航栏
            //1，导入配置文件
            require 'dbconfig.php';

            //2.连接数据库，并选择数据库
            $link = @mysql_connect(HOST,USER,PASS) or die("数据库连接失败！");
            mysql_query("set names utf-8");
            mysql_select_db(DBNAME,$link);
            //3.执行查询要修改的信息
            $sql = "select * from weixin_students where student_id=".$_GET['student_id'];
            $result = mysql_query($sql,$link);
            //4.判断并解析出要修改的信息
            if ($result && mysql_num_rows($result)>0){
            	$stu = mysql_fetch_assoc($result);
            }else{
            	die("没有找到要修改的信息！");
            }
      ?>
      <h3>修改用户信息</h3>
      <form action="action.php?a=update" method="post">
      <input type="hidden" name="student_id" value="<?php echo $stu['student_id'];?>" />
      <table width="300" border="0">
      <tr>
         <td>学号：</td>
         <td><input type="text" name="student_code" value="<?php echo $stu['student_code'];?>" /></td>
      </tr>
      <tr>
         <td>姓名：</td>
         <td><input type="text" name="student_name" value="<?php echo $stu['student_name'];?>" /></td>
      </tr>
      <tr>
         <td>学校名称：</td>
         <td><input type="text" name="school_name" value="<?php echo $stu['school_name'];?>" /></td>
      </tr>
      <tr>
         <td>学院ID：</td>
         <td><input type="text" name="academy_id" value="<?php echo $stu['academy_id'];?>" /></td>
      </tr>
      <tr>
         <td>专业：</td>
         <td><input type="text" name="major" value="<?php echo $stu['major'];?>" /></td>
      </tr>
      <tr>
         <td>性别：</td>
         <td><input type="radio" name="student_sex" value="女" <?php echo ($stu['student_sex']=="女")?"checked":""; ?> />女
             <input type="radio" name="student_sex" value="男" <?php echo ($stu['student_sex']=="男")?"checked":""; ?> />男</td>
      </tr>
      <tr>
         <td>身份证号：</td>
         <td><input type="text" name="student_identity_number" value="<?php echo $stu['student_identity_number']?>" /></td>
      </tr>
      <tr>
         <td>准考证号：</td>
         <td><input type="text" name="student_exam_number" value="<?php echo $stu['student_exam_number']?>" /></td>
      </tr>
      <tr>
         <td>电话号码：</td>
         <td><input type="text" name="student_phone_number" value="<?php echo $stu['student_phone_number']?>" /></td>
      </tr>
      <tr>
         <td>微信ID：</td>
         <td><input type="text" name="student_weixin_id" value="<?php echo $stu['student_weixin_id']?>" /></td>
      </tr>
      <tr>
         <td>二维码：</td>
         <td><input type="text" name="student_qrcode_entry" value="<?php echo $stu['student_qrcode_entry']?>" /></td>
      </tr>
      <tr>
         <td>入学日期：</td>
         <td><input type="text" name="student_enter_date" value="<?php echo $stu['student_enter_date']?>" /></td>
      </tr>
      <tr>
         <td>&nbsp</td>
         <td><input type="submit" value="修改" />
             <input type="reset" value="重置" /></td>
      </tr>
      </table>
      </form>
</center>
</body>
</html>